package com.itshare.video.pojo.bo;

import com.itshare.video.common.aop.xss.annontation.CleanXSS;
import com.itshare.video.pojo.dto.UserTokenDTO;
import lombok.Data;
import org.hibernate.validator.constraints.Range;
import org.hibernate.validator.constraints.URL;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.util.Date;

/**
 *
 * 视频第一次创建 前端提交的 JSON
 *
 * @Author lyr
 * @create 2020/10/24 14:29
 */
@Data
public class VideoCreateBO {

    @Null(message = "没有pk 这个字段")
    private Long pk;
    @Null(message = "没有userId这个字段")
    private Long userId;


    /**
     * 标题
     */
    @CleanXSS
    @NotBlank(message = "标题title不能为空")
    private String title;



    @URL
    @NotBlank(message = "视频链接不能为空")
    private String videoUrl;

    @NotBlank(message = "视频简介不能为空")
    @CleanXSS
    private String videoMessage;
    @Min(value = 1L,message = "数据库不存在该分类")
    @NotNull(message = "视频分类不能为空")
    private Integer categoryId;


    /**
     * 该视频属于哪个视频合集，可选
     */
    private Integer videoListId;

    // @NotBlank(message = "封面视频链接不能为空")
    // @URL
    private String coverUrl;


    private UserTokenDTO userTokenDTO;




    /**
     * 更新视频
     */
    private Date updateTime;
    /**
     * 创建时间
     */
    private Date createTime;



}
